﻿Imports System.Runtime.CompilerServices

Public Module ControllerHelpers
    <Extension()>
    Public Sub AddRuleViolations(ByVal modelState As ModelStateDictionary, ByVal errors As IEnumerable(Of RuleViolation))
        For Each issue In errors
            modelState.AddModelError(issue.PropertyName, issue.ErrorMessage)
        Next
    End Sub
End Module
